let bignum = require('bignumber')

const CURRENCY = 'MAN.XQT'

module.exports = {
    submitValidateScore: async function(step,validate){
        ///5+21*step+0.7*score=validate
        if(!step || !validate){
            return 'Invalid params'
        }
        step = Number(step)
        validate = Number(validate)
        let score = (validate - 5 - 21 * step) / 0.7
        let rightScore = step * 100
        if(score != rightScore){
            return 'Invalid step and validate'
        }
        app.sdb.create('gameValidate',{
            vId:app.autoID.increment('gameValidate_vId'),
            address: this.trs.senderId,
            step: step,
            score:score,
            height: this.trs.height
        })

    }
}